<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>留言列表</title>
</head>

<body>
<a href="/publish">发表留言</a>
<% if(message.length === 0) { %>
    <p>当前没有留言</p>
<% } else{ %>
    <table>
        <tr>
            <th>留言时间</th>
            <th>留言人</th>
            <th>留言内容</th>
        </tr>
        <% message.forEach((message) => { %>
            <tr>
                <td><%= message.time %></td>
                <td><%= message.name %></td>
                <td><%= message.content %></td>
            </tr>
        <% }) %>
    </table>
<% } %>
</body>
</html>
